package strategies;

import selectors.StrategySelector;
import base.Environment;

public abstract class StrategyFactory {

	public static StrategyGenerator newGenerator(Environment env, String clazz) throws Exception {
		
		return (StrategyGenerator)
				Class.forName(clazz).getDeclaredConstructor(Environment.class).newInstance(env);
	}
	
	public static StrategySelector newSelector(Environment env, String clazz) throws Exception {
		
		return (StrategySelector)
				Class.forName(clazz).getDeclaredConstructor(Environment.class).newInstance(env);
	}
}
